<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            display: flex;
            width: 800px;
            height: 400px;
            background-color: pink;
            justify-content: center;
            /* 1.侧轴从小到下 */
            /* align-items: flex-start; */
            /* 2.从下到上 */
            /* align-items: flex-end; */
            /* 3.挤在一起居中(垂直居中) */
            /* align-items: center; */
            /* 4.拉伸，但是子元素不要给高度 */
            align-items: stretch;
        }
        div span{
            width: 150px;
            /* height: 100px; */
            color: #fff;
            background-color: purple;
            margin: 10px;
        }
    </style>
</head>
<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
    </div>
</body>
</html>